

<%= form_for @link ,html:  {class: 'pure-form submit_form'} , url:  links_path, method: :post  do |f| %>


    <% if @link.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@link.errors.count, "error") %> prohibited this link from being saved:</h2>
      <ul>
        <% @link.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
    <% end %>



    <div class="field">
      <%= f.text_field :origin, placeholder: "原始网址（http与https开头）" %>
    </div>
    <div class="field">
      <%= f.text_field :custom, placeholder: "自定义短网址后缀(可选)" %>
    </div>

    <%= f.submit "提交", class: "pure-button pure-button-primary" %>


<% end %>

